home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / cmds.fmt / basename.man < prev    next >
Encoding:
Text File  |  1989-03-22  |  919 b   |  67 lines

  1.  
  2.  
  3.  
  4. BASENAME                  User Commands                  BASENAME
  5.  
  6.  
  7.  
  8. NNAAMMEE
  9.      basename - strip filename affixes
  10.  
  11. SSYYNNOOPPSSIISS
  12.      bbaasseennaammee string [ suffix ]
  13.  
  14. DDEESSCCRRIIPPTTIIOONN
  15.      _B_a_s_e_n_a_m_e deletes any prefix ending in `/' and the _s_u_f_f_i_x, if
  16.      present in _s_t_r_i_n_g, from _s_t_r_i_n_g, and prints the result on the
  17.      standard output.  It is normally used inside substitution
  18.      marks ` ` in shell procedures.
  19.  
  20.      This shell procedure invoked with the argument
  21.      /_u_s_r/_s_r_c/_b_i_n/_c_a_t._c compiles the named file and moves the
  22.      output to _c_a_t in the current directory:
  23.  
  24.                     cc $1
  25.                     mv a.out `basename $1 .c`
  26.  
  27. SSEEEE AALLSSOO
  28.      sh(1)
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. Sprite v1.0              April 29, 1985                         1
  64.  
  65.  
  66.  
  67.